﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using xiaodingmarket_Domain_core.Models;
using static xiaodingmarket_Domain.Models.EunmType;


namespace xiaodingmarket_Domain.Models
{
    public class User: AggregateRoot
    {
        public User()
        {

        }
        public User(Guid id,string studentId, string studentName, string pwd, DateTime lastLoginTime, DateTime logTime, DateTime modifyTime, string createUserId, string modifyUserId, bool isDelete)
        {
            Id = id;
            StudentId = studentId;
            StudentName = studentName;
            Pwd = pwd;
            LastLoginTime = lastLoginTime;
            LogTime = logTime;
            ModifyTime = modifyTime;
            CreateUserId = createUserId;
            ModifyUserId = modifyUserId;
            IsDelete = isDelete;
          
            
        }
        public User(Guid id,string studentId, string studentName, string studentSex, string collegename, string userid, string userName, string userPictureSrc,string pwd, DateTime lastLoginTime, DateTime logTime, DateTime modifyTime, string createUserId, string modifyUserId, bool isDelete, string remark)
        {
            Id = id;

            StudentId = studentId;
            StudentName = studentName;
            StudentSex = studentSex;
            this.collegename = collegename;
            Userid = userid;
            UserName = userName;
            UserPictureSrc = userPictureSrc;
            //address = adress;
            this.email = email;
            Pwd = pwd;
            LastLoginTime = lastLoginTime;
            LogTime = logTime;
            ModifyTime = modifyTime;
            CreateUserId = createUserId;
            ModifyUserId = modifyUserId;
            IsDelete = isDelete;
            this.remark = remark;
         
        }

        /// <summary>
        /// 学号
        /// </summary>
        [Column(TypeName = "varchar(200)")]
        public string StudentId { get; set; }
        /// <summary>
        /// 真实姓名
        /// </summary>
        [Column(TypeName = "varchar(100)")]
        public string StudentName { get; set; }
        /// <summary>
        /// 真实性别
        /// </summary>
        [Column(TypeName = "varchar(50)")]
        public string StudentSex { get; set; }
        /// <summary>
        /// 学生所在学院
        /// </summary>
        [Column(TypeName = "varchar(100)")]
        public string collegename { get; set; }
        /// <summary>
        /// 易班用户id
        /// </summary>
        [Column(TypeName = "varchar(100)")]
        public string Userid { get; set; }
        /// <summary>
        /// 易班用户昵称
        /// </summary>
        [Column(TypeName = "varchar(100)")]
        public string UserName { get; set; }
        /// <summary>
        /// 易班头像所在地址
        /// </summary>
        [Column(TypeName = "varchar(100)")]
        public string UserPictureSrc { get; set; }
        /// <summary>
        /// 用户生日
        /// </summary>
        //public string birthday { get; set; }
        /// <summary>
        ///地址
        /// </summary>
       // public Address address { get; set; }
        /// <summary>
        ///邮箱
        /// </summary>
        [Column(TypeName = "varchar(50)")]
        public String email { get; set; }
        /// <summary>
        ///密码
        /// </summary>
        [Column(TypeName = "varchar(50)")]
        public String Pwd { get; set; }

        /// <summary>
        /// 最后一次登陆时间
        /// </summary>
        public DateTime LastLoginTime { get; set; }
        /// <summary>
        /// 生成时间
        /// </summary>
        public DateTime LogTime { get; set; }
        /// <summary>
        /// 最后一次修改时间
        /// </summary>
        public DateTime ModifyTime { get; set; }
        /// <summary>
        /// 创建者id
        /// </summary>
        public string CreateUserId { get; set; }
        /// <summary>
        /// 修改者id
        /// </summary>
        public string ModifyUserId { get; set; }
        /// <summary>
        /// 注销
        /// </summary>
        public bool IsDelete { get; set; }
        /// <summary>
        ///备注
        /// </summary>
        public String remark { get; set; }

        public List<UserRoles> userroles { get; set; }
        ///// <summary>
        ///// 用户发布的商品id(未卖出)
        ///// </summary>
        //public List<Guid> Commodityhistory { get; set; }
        ///// <summary>
        ///// 用户发布的悬赏id(未卖出)
        ///// </summary>
        //public List<Guid> Rewardhistory { get; set; }
        ///// <summary>
        ///// 已完成的订单集合
        ///// </summary>
        //public List<Guid> complete { get; set; }

    }
}
